/**
 * @(#)BrandSelectorWidget.java 2011
 *
 * Copyright 2011 classic-commerce
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 *
 * @author: <a href="mailto:richard@ioniq.ca">Richard Mutezintare</a>
 *
 */
package ca.ioniq.client.widget.content;


import java.util.HashMap;
import java.util.Map;

import com.google.gwt.user.client.ui.FlowPanel;
import com.google.gwt.user.client.ui.Image;

public class BrandSelectorWidget extends FlowPanel {
    private static String ID = "brand_selector";

    private Map brandMap = new HashMap<Image, Integer>();

    /**
     * Build a list of brand image. Receives a map so that we can match a brand
     * logo image with the id of the brand.
     *
     * @param brandMap
     */
    public BrandSelectorWidget(Map<Image, Integer> brandMap) {

        for(Image brandImage : brandMap.keySet()) {
            add(brandImage);
        }

        getElement().setId(ID);
    }

    public Map getBrandMap() { return brandMap; }
}
